/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scrvtbtiprevist")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scrvtbtiprevist.findAll", query = "SELECT s FROM Scrvtbtiprevist s"),
    @NamedQuery(name = "Scrvtbtiprevist.findByScrvtbtiprevistid", query = "SELECT s FROM Scrvtbtiprevist s WHERE s.scrvtbtiprevistid = :scrvtbtiprevistid"),
    @NamedQuery(name = "Scrvtbtiprevist.findByNombre", query = "SELECT s FROM Scrvtbtiprevist s WHERE s.nombre = :nombre"),
    @NamedQuery(name = "Scrvtbtiprevist.findByObservaciones", query = "SELECT s FROM Scrvtbtiprevist s WHERE s.observaciones = :observaciones")})
public class Scrvtbtiprevist implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scrvtbtiprevistid")
    private Integer scrvtbtiprevistid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "nombre")
    private String nombre;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;

    public Scrvtbtiprevist() {
    }

    public Scrvtbtiprevist(Integer scrvtbtiprevistid) {
        this.scrvtbtiprevistid = scrvtbtiprevistid;
    }

    public Scrvtbtiprevist(Integer scrvtbtiprevistid, String nombre, String observaciones) {
        this.scrvtbtiprevistid = scrvtbtiprevistid;
        this.nombre = nombre;
        this.observaciones = observaciones;
    }

    public Integer getScrvtbtiprevistid() {
        return scrvtbtiprevistid;
    }

    public void setScrvtbtiprevistid(Integer scrvtbtiprevistid) {
        this.scrvtbtiprevistid = scrvtbtiprevistid;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scrvtbtiprevistid != null ? scrvtbtiprevistid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scrvtbtiprevist)) {
            return false;
        }
        Scrvtbtiprevist other = (Scrvtbtiprevist) object;
        if ((this.scrvtbtiprevistid == null && other.scrvtbtiprevistid != null) || (this.scrvtbtiprevistid != null && !this.scrvtbtiprevistid.equals(other.scrvtbtiprevistid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scrvtbtiprevist[ scrvtbtiprevistid=" + scrvtbtiprevistid + " ]";
    }
    
}
